{assign var=formId value='add'}
<div id="content">
    <div class="highlight">
        {if isset($menu)}{$menu}{/if}
        {if isset($searchtype)}{$searchtype}{/if}
        {if $infoText}
            <div class="{$infoClass}">
                <h4>Result:</h4>
                <p>{$infoText}</p>
            </div>
        {/if}
        {include file="admin/toolbar.temp.html" title=toolbar}  
        <div class="formType">
            <form action="{$base_url}" method="post" id="{$formId}" name="{$formId}" enctype="multipart/form-data">
                <fieldset>
                <div class="left">
                    <div class="titles">{l s='infoneed'}</div>
                    <div style="clear:both;">
                    <ul class="tabs">
                        <li class="tab">{l s='background'}</li>
                        <!--<li class="tab">{l s='images'}</li>-->
                        <!--<li class="tab">{l s='video'}</li>-->
                        {if $objectLanguages}
                            {foreach $objectLanguages as $objectlang} 
                                <li class="tab {if $objectlang@first}selected{/if}">{$objectlang->getField('name')}</li>
                            {/foreach}
                        {/if}
                    </ul>
                    <div class="tabcontent">
                        <p>
                            <span>{l s='Please choice a background for this news...'}</span>
                            {if is_object($objectInfo)}
                                {if $objectInfo->getField('background') != ''}
                                    <img src="{$objectInfo->getBackground()}" style="max-width: 696px; max-height: 400px;" /><br />
                                    <input type="checkbox" name="background_del" style="width:auto"/>&nbsp;{l s='Click into button beside to delete'}<br /><br />
                                {/if}
                            {/if}
                            <input type="file" name="background" id="background" />
                        </p>
                        <br class="clear">
                    </div>
<!--                                     
                    <div class="tabcontent">
                        {if $arrayavatar}
                        <p><span>{l s='notetodeletepicture'}</span></p>
                        {foreach $arrayavatar as $avatar}
                        <div class="division4">
                            <img src="{$url->getFullUrlAvatar('news', 'avatar', $avatar)}"/>
                            <input type="checkbox" name="del_images[]" style="width:auto" value="{$avatar}"/>
                        </div>
                        {/foreach}
                        {/if}                        
                        <p>
                            <label for="avatar">{l s='avatar'}</label>
                            <span>{l s='avatar_help'}</span>
                            <input type="file" name="avatar[]"/>                             
                            <label id="uploadfiles" style="float:right;"><a href="javascript:void(0)" onclick="addImages();">{l s='clickheretoaddupload'}</a></label>
                        </p>                        
                    </div>
-->
 
<!--                    
                    <div class="tabcontent">
                        <p>
                            <label for="video">{l s='video'}</label>
                            <span>{l s='video_help'}</span>
                            <input type="text" name="video" value="{$video}" />
                        </p>                    
                        <p style="display:none">
                            <label for="video">{l s='video'}</label>
                            <span>{l s='video_help'}</span>
                            <input type="file" name="video" id="video" />
                        </p>                        
                    </div>
-->
                    {if $objectLanguages}
                        {foreach $objectLanguages as $objectlang} 
                            
                            <div class="tabcontent {if $objectlang@first}selected{/if}">
                                <p>
                                    <label for="{$objectlang->getField('code')}_name">{l s='name'} *</label>
                                    <span>{l s='name_help'}</span>
                                    <input type="text" name="{$objectlang->getField('code')}_name" value="{$objectInfo->getFieldLangAdmin($objectlang->getField('code'),'name')}" />
                                </p>                               
                                <p>
                                    <label for="{$objectlang->getField('code')}_abstract">{l s='abstract'}</label>
                                    <span>{l s='abstract_help'}</span>                             
                                    <textarea name="{$objectlang->getField('code')}_abstract" class="mceSimple" style="width:97% !important">{$objectInfo->getFieldLangAdmin($objectlang->getField('code'), 'abstract')}</textarea>
                                </p>
                                <p>
                                    <label for="{$objectlang->getField('code')}_details">{l s='details'} *</label>
                                    <span>{l s='details_help'}</span>
                                    <textarea name="{$objectlang->getField('code')}_details" class="mceAdvanced" style="width:97%">{$objectInfo->getFieldLangAdmin($objectlang->getField('code'),'details')}</textarea>
                                </p>
                                <br class="clear"/>
                            </div>

                        {/foreach}
                    {/if}
                    </div>
                </div>
                <div class="right">
                    <div class="titles">{l s='infononeed'}</div>
                    <div id="accordion">
<!--                    
                        {if $subCategories}
                        <div class="title">{l s='category'}</div>
                        <div class="content first">                            
                            <p>
                                <span>{l s='category_help'}</span>
                                {foreach from = $subCategories item = object}

                                    <span class="division2"><input type="checkbox" name="arraycid[]" value="{$object->getField('id')}" {foreach from = $arraycid item = itemcid}{if $object->getField('id') eq $itemcid}checked="checked"{/if}{/foreach} style="width:30px;"/> {$object->getFieldLangAdmin($lang, 'name')}</span>

                                {/foreach}                                
                            </p>                               
                        </div>
                        {/if}
-->
<!--
                        <div class="title">{$messages.relax}</div>
                        <div class="content">                            
                            <p>
                                <span>{$messages.relax_help}</span>
                                {foreach from = $arrRelax item = object}

                                    <span class="division2">
                                        <input type="radio" name="relaxid" value="{$object->getField('id')}" {if $object->getField('id') eq $relaxid}checked="checked"{/if} style="width:30px;"/> 
                                        {$object->getFieldLangAdmin($lang,'name')}
                                    </span>

                                {/foreach}                                
                            </p>                               
                        </div>   
-->                
                        <div class="title">{l s='properties'}</div>
                        <div class="content">
                            <p>
                                <label for="status">{l s='category'} *</label>
                                <span>{l s='category_help'}</span>
                                <select name="cid">
                                <option value="{$pid}">/</option>
                                    {$listCategories}
                                </select>
                            </p>                        
                            <p>
                                <label for="status">{l s='status'} *</label>
                                <span>{l s='status_help'}</span>
                                <select name="status">
                                    {$listStatus}
                                </select>
                            </p>
                            <p>
                                <label for="keyword">{l s='keyword'}</label>
                                <span>{l s='keyword_help'}</span>
                                <input type="text" name="keywords" value="{$keywords}" />
                            </p>
<!--                            
                            <p>
                                <label for="keyword">{l s='date_created'}</label>
                                <span>{l s='date_created_help'}</span>
                                <input type="text" name="date_created" id="datepicker" value="{$date_created}" />
                            </p>
-->
                            <p>
                                <!--<input type="hidden" name="cid" value="{$pid}" />-->
                            </p>
<!--                            
                            <p class="radioType">
                                <input type="checkbox" name="hot" {if $hot == 1 }checked="checked"{/if} value="1" />
                                <label for="hot">{l s='hot'}</label><br />
                                 <span>{l s='hot_help'}</span>
                            </p>  
-->                                                    
<!--
                            <p class="radioType">
                                <input type="checkbox" name="home" {if $home == 1 }checked="checked"{/if} value="1" />
                                <label for="home">{l s='home'}</label><br />
                                 <span>{l s='home_help'}</span>
                            </p>                                
-->
                        </div>                      
                    </div>
      
                </div>
                <div class="over">
                    <p class="btnType">
                        <input type="hidden" id="op"  name="op" value="{$op}" />
                        <input type="hidden" id="act" name="act" value="{$act}" />
                        <input type="hidden" id="oId" name="oId" value="{$oId}" />
                        <input type="hidden" id="pid" name="pid" value="{$pid}" />
                        <input type="hidden" id="plus" name="plus" value="saveItem"/>
                    </p>
                </div> 
                <br style="clear:both"/>   
                </fieldset>
            </form>
        </div>
    </div>
</div>